From 21dcfe7f1106d4d04daec7ff51791406615451bd Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Mon, 4 Apr 2011 22:46:26 -0500 Subject: [PATCH] require-movemail-use-liblockfile.diff * The build will fail if liblockfile isn't selected for movemail. Patch: require-movemail-use-liblockfile.diff Author: Rob Browning Added-by: Rob Browning This makes sure the Debian Emacs won't accidentally be built with the wrong locking strategy. To disable this check, comment out require-movemail-use-liblockfile.diff in debian/patches/series. --- lib-src/movemail.c | 4 ++++ src/s/bsd-common.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib-src/movemail.c b/lib-src/movemail.c index ae51df3d39c..7c8cfff21d5 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -166,6 +166,10 @@ int mbx_delimit_end (); /* Nonzero means this is name of a lock file to delete on fatal error. */ char *delete_lockname; +#ifndef MAIL_USE_MAILLOCK +#error "Debian requires that mail locking be handled by liblockfile." +#endif /* ndef MAIL_USE_MAILLOCK */ + int main (argc, argv) int argc; diff --git a/src/s/bsd-common.h b/src/s/bsd-common.h index 8094f50d317..fd0eb1ae786 100644 --- a/src/s/bsd-common.h +++ b/src/s/bsd-common.h @@ -66,7 +66,11 @@ along with GNU Emacs. If not, see . */ The alternative is that a lock file named /usr/spool/mail/$USER.lock. */ +/* conditional copied from gnu-linux.h */ +#if !((defined (HAVE_LIBMAIL) || defined (HAVE_LIBLOCKFILE)) && \ + defined (HAVE_MAILLOCK_H)) #define MAIL_USE_FLOCK +#endif /* Define CLASH_DETECTION if you want lock files to be written so that Emacs can tell instantly when you try to modify -- 2.30.2